/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sandbox.org.wads.elements;

import org.enhydra.shark.xpdl.XMLAttribute;
import org.enhydra.shark.xpdl.XMLCollectionElement;

/**
 *
 * @author Nattasan W.
 */
public class DataField extends XMLCollectionElement {

  public DataField(DataFields parent) {
    super(parent, true);
  }
  
  @Override
  protected void fillStructure() {
    XMLAttribute attrName = new XMLAttribute(this, "Name", false);
    XMLAttribute attrVal = new XMLAttribute(this, "Val", true);
    
    super.fillStructure();
    add(attrName);
    add(attrVal);
  }
  
  public String getName() {
    return get("Name").toValue();
  }
  
  public void setName(String val) {
    set("Name", val);
  }
  
  public String getVal() {
    return get("Val").toValue();
  }
  
  public void setVal(String val) {
    set("Val", val);
  }

}
